"""firstproject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import re_path
from app1 import views

app_name = "app1"
urlpatterns = [
    path('app1/', views.app1),
    path('book/<int:ss>', views.book),  # 匹配 url路径的 某种模式
    path('book/<str:ss>', views.bookstr),  # 匹配 url路径的 某种模式
    path('book/<path:path>', views.bookpath),  # 匹配 url路径的 某种模式
    path("book1/", views.parm),
    re_path('book2/(?P<bookname>\d{4})/', views.bookre),
    re_path('book3/(?P<bookname>[\u4e00-\u9fa5]+)/', views.book_zh),
    # re_path(r'^bio/(?P<username>\w+)/$', views.bio, name='bio'),
    path("home/", views.homepage),
    path("fruit/", views.fruit, name="fruit"),
    path("base/", views.base),
    path("son/", views.son),




]
